package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.AddTableIndexDao;
import com.hera.process.config.service.AddTableIndexService;
import com.hera.process.external.domain.AddTableIndex;

@Service("addtableindexservice")
public class AddTableIndexServiceImpl implements AddTableIndexService{

	static final Logger logger = Logger.getLogger(AddTableIndexServiceImpl.class);
	
	@Autowired
	private AddTableIndexDao addtableindexdao;
	
	@Override
	public AddTableIndex findById(String id) {
		
		return addtableindexdao.findOne(id);
	}

	@Override
	public void update(AddTableIndex entity) {
		
		addtableindexdao.save(entity);
	}

	@Override
	public void save(AddTableIndex entity) {
		
		addtableindexdao.save(entity);
	}

	@Override
	public void delete(AddTableIndex entity) {
		
		addtableindexdao.delete(entity);;
	}

	@Override
	public List<AddTableIndex> findAll() {
		
		return addtableindexdao.findAll();
	}

	@Override
	public List<AddTableIndex> findAll(FiltroDTO filtroDTO) {
		
		return addtableindexdao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
